package com.zengde.zxfy.dto;

import jakarta.validation.constraints.*;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import java.math.BigDecimal;

@Data
public class EmpDTO {
    @NotBlank(message = "用户名不能为空")
    @Size(min = 2, max = 20, message = "用户名长度必须在2-20之间")
    @Pattern(regexp = "^[a-zA-Z]+$", message = "用户名只能包含字母")
    private String username;

    @NotBlank(message = "姓名不能为空")
    @Size(min = 2, max = 10, message = "姓名长度必须在2-10之间")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]+$", message = "姓名只能包含汉字")
    private String name;

    @NotNull(message = "性别不能为空")
    @Pattern(regexp = "^(男|女)$", message = "性别只能选择 男/女")
    private String gender;

    @NotBlank(message = "手机号不能为空")
    @Size(min = 11, max = 11, message = "手机号必须是11位")
    @Pattern(regexp = "^\\d{11}$", message = "手机号必须是11位数字")
    private String phone;

    @Pattern(regexp = "^(班主任|讲师|学工主管|教研主管|咨询师)$", message = "职位只能选择：班主任/讲师/学工主管/教研主管/咨询师")
    private String position;

    @Digits(integer = 10, fraction = 2, message = "薪资必须是数字")
    private BigDecimal salary;

    private String avatar;

    @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "入职日期格式必须为：年-月-日")
    private String entrydate;

    private Integer deptId;

    @Size(min = 2, max = 50, message = "工作经历-公司名称长度必须在2-50之间")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9]+$", message = "工作经历-公司名称只能包含汉字、字母、数字")
    private String workCompany;

    @Size(min = 2, max = 50, message = "工作经历-职位名称长度必须在2-50之间")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9]+$", message = "工作经历-职位名称只能包含汉字、字母、数字")
    private String workPosition;

    @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "工作经历时间格式必须为：年-月-日")
    private String workStartDate;

    @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "工作经历时间格式必须为：年-月-日")
    private String workEndDate;
} 